package com.hjs.community.file.config;

import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSConfig {
    //构造一个带指定 Region 对象的配置类
    @Bean
    public com.qiniu.storage.Configuration configuration(){
        return new com.qiniu.storage.Configuration(Region.region2());
    }
    @Bean
    public UploadManager uploadManager(){
        return new UploadManager(configuration());
    }


}
